<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-19 19:23:30
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-19 21:42:03
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <div>
            <span id="time"></span>
        </div>
        <script src="../js/Date.js"></script>
        <script>
            var date = new Date("2020-6-22 00:00:00");
            var timer = setInterval(function(){
               var cur_date = new Date();
               
                    var oDate = time_dif(date,cur_date);
                    var day = oDate.day;
                    var hour =oDate.hour;
                    var min = oDate.min;
                    var sec = oDate.sec;
                    console.log(day);
                    
                        time.innerHTML="距离2020-6-20还有"+day+"天"+hour+"小时"+min+"分钟"+sec+"秒" 
                    
            },1000)
        </script>
    </body>
    </html>
</body>
</html>